package cn.karent.client.dto;

import com.fasterxml.jackson.databind.PropertyNamingStrategies;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.*;

/**
 * @author wanshengdao
 * @date 2025/4/15
 */
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public class SearchReq {

    @NotNull(message = "分类不能为空")
    @Positive(message = "页数从1开始")
    private Integer page;

    @NotNull(message = "数量不能为空")
    @Positive(message = "数量大于1")
    private Integer num;

    @NotBlank(message = "搜索值不能为空")
    private String value;

}
